/*
 * Okno.java
 *
 * Created on 12 czerwiec 2008, 08:45
 */
package gui;

import java.awt.Dimension;
import prostagra.Gra;
import prostagra.PanelGry;
import prostagra.Zabijanka;

/**
 *
 * @author  m
 */
public class Okno extends javax.swing.JFrame
{

    private PanelGry gp;
    
    /** Creates new form Okno */
    public Okno()
    {
        initComponents();
        
    }

    /** Creates new form Okno
     * @param gra 
     */
    public Okno(Gra gra)
    {
        init(gra);
    }
/** Initializes variables
     * @param gra 
     */
    public void init(Gra gra)
    {
        gp = new prostagra.PanelGry(gra, 800, 600);
        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        getContentPane().add(gp, java.awt.BorderLayout.CENTER);
        pack();
        gp.requestFocus();
        gp.start();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(800, 600));

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Okno().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables

}
